import java.io.*;
public class Ch14_1 {
	public static void main (String arg[]) throws IOException
	{
		FileWriter fw= new FileWriter("C:\\Java\\test1.text");
		char data[]={'火','車','快','飛','，','火','車','快','飛'};
		fw.write(data);
		fw.close();
		char data2[] =new char[128];
		FileReader fw1=new FileReader("C:\\Java\\test1.text");
		int num=fw1.read(data2);
		String str=new String(data2,0,num);
		System.out.println("Characters read= "+num);
		System.out.println(str);
		fw1.close();
	}

}
